<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(function(){
		/**
		**下拉框样式
		**/
		$(".chzn-select-deselect").chosen({allow_single_deselect:true});
		$(".chzn-select-nosearch").chosen({disable_search:true});
		$(".chzn-select").chosen();
		var zidx = 100;
		$('.chzn-container').each(function(){
		$(this).css('z-index', zidx);
		zidx-=1;
		});
		//
		$('#pageSize').on('change',function(e){
		    var url=$("#url").val()+'?pageSize='+this.value;
		    window.location.href=url;
		 });
 
	});
	
	function subdata(pageNum){
		var totalPage=$("input[id=totalPage]").val();
		debugger;
		if(1<=pageNum && pageNum<=totalPage){
			$("input[id=pageNum]").val(pageNum);
			$("#queryForm").submit();
		}
	}
	</script>
<div style="text-align: right;">
	共：${page.totalPage}页 &nbsp;${page.totalRecord}条记录 <a onclick="subdata(${page.pageNum-1})"> <img
		src="${ctx}/widgets/simpletable/images/prevPageDisabled.gif"
		style="border: 0">
	</a> <input id="totalPage" type="hidden" value="${page.totalPage}">
	<c:choose>
		<c:when test="${page.totalPage>10}">
			<c:forEach var="i" begin="1" end="10" step="1">
				&nbsp;&nbsp;
				<c:if test="${page.pageNum==i}">${i}</c:if>
				<c:if test="${page.pageNum!=i}">
					<a onclick="subdata(${i})">${i}</a>
				</c:if>
			</c:forEach>
		</c:when>
		<c:otherwise>
			<c:forEach var="i" begin="1" end="${page.totalPage}" step="1">
			&nbsp;&nbsp;
				<c:if test="${page.pageNum==i}">${i}</c:if>
				<c:if test="${page.pageNum!=i}">
					<a onclick="subdata(${i})">${i}</a>
				</c:if>　
			</c:forEach>
		</c:otherwise>
	</c:choose>
	<a onclick="subdata(${page.pageNum+1})"> <img
		src="${ctx}/widgets/simpletable/images/nextPage.gif" style="border: 0">
	</a> <input name="pageNum" id="pageNum" type="hidden"> <select
		name="pageSize" id="pageSize">
		<option value="10" <c:if test="${page.pageSize==10}"> selected </c:if>>10</option>
		<option value="20" <c:if test="${page.pageSize==20}"> selected </c:if>>20</option>
		<option value="50" <c:if test="${page.pageSize==50}"> selected </c:if>>50</option>
		<option value="100"
			<c:if test="${page.pageSize==100}"> selected </c:if>>100</option>
	</select>
</div>